/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

应用管理平台API (仅对授权用户使用)
应用管理平台API

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKAms/AmsApiModel.h>


@implementation AmsDescribeStreamsInputRequest
-(id) initWithRegion:(NSString *)regionId
startTime:(NSString*)startTime
endTime:(NSString*)endTime
streamId:(NSString*)streamId { 
    self.regionId = regionId;
    self.startTime = startTime;
    self.endTime = endTime;
    self.streamId = streamId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
startTime:(NSString*)startTime
endTime:(NSString*)endTime
streamId:(NSString*)streamId { 
    self.regionId = regionId;
    self.version = version;
    self.startTime = startTime;
    self.endTime = endTime;
    self.streamId = streamId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self streamId])
    {
        [result setValue:[self streamId] forKey:@"streamId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.streamId = [dictionary objectForKey:@"streamId"];
    return self;
} 

@end
@implementation AmsDescribeAuthenticateRequest
-(id) initWithRegion:(NSString *)regionId
ver:(NSNumber*)ver
pId:(NSString*)pId { 
    self.regionId = regionId;
    self.ver = ver;
    self.pId = pId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
ver:(NSNumber*)ver
pId:(NSString*)pId { 
    self.regionId = regionId;
    self.version = version;
    self.ver = ver;
    self.pId = pId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self ver])
    {
        [result setValue:[self ver] forKey:@"ver"];
    }
    if([self pId])
    {
        [result setValue:[self pId] forKey:@"pId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ver = [dictionary objectForKey:@"ver"];
    self.pId = [dictionary objectForKey:@"pId"];
    return self;
} 

@end
@implementation AmsDescribeAuthenticateResult
-(id) initWithPId:(NSString*) pId
        ver:(NSNumber*)ver
        blacklist:(NSNumber*)blacklist
        status:(NSNumber*)status
        license:(NSString*)license { 
    self.pId = pId;               
    self.ver = ver;               
    self.blacklist = blacklist;               
    self.status = status;               
    self.license = license;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pId])
    {
        [result setValue:[self pId] forKey:@"pId"];
    }
    if([self ver])
    {
        [result setValue:[self ver] forKey:@"ver"];
    }
    if([self blacklist])
    {
        [result setValue:[self blacklist] forKey:@"blacklist"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self license])
    {
        [result setValue:[self license] forKey:@"license"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pId = [dictionary objectForKey:@"pId"];
    self.ver = [dictionary objectForKey:@"ver"];
    self.blacklist = [dictionary objectForKey:@"blacklist"];
    self.status = [dictionary objectForKey:@"status"];
    self.license = [dictionary objectForKey:@"license"];
    return self;
} 

@end
@implementation AmsDescribeStreamsInputResult
-(id) initWithStreamInputDatas:(NSArray<StreamInputData*>*) streamInputDatas { 
    self.streamInputDatas = streamInputDatas;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self streamInputDatas])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self streamInputDatas] count]; i++) {
            StreamInputData* item = [[self streamInputDatas] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"streamInputDatas"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* streamInputDatasArray = [dictionary objectForKey:@"streamInputDatas"];
    if(streamInputDatasArray&&![streamInputDatasArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [streamInputDatasArray count];i++)
        {
        StreamInputData* item = [[StreamInputData alloc]initWithDic:[streamInputDatasArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.streamInputDatas = propertyArray;
    }
    return self;
} 

@end
  
@implementation AmsDescribeStreamsInputResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
AmsDescribeStreamsInputResult* result = [[AmsDescribeStreamsInputResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(AmsDescribeStreamsInputResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation AmsDescribeAuthenticateResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
AmsDescribeAuthenticateResult* result = [[AmsDescribeAuthenticateResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(AmsDescribeAuthenticateResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
